Quick question hope someone can help. When I do a ...
# lucee
m
Quick question hope someone can help. When I do a <cfdump> I get no styles when the dump outputs. I just get this rather the usual pretty cf dump screen
b
I've seen that when the dump is in the middle of a broken page and so there are often unclosed html tags. The thing that has worked for me, as long as you don't mind not seeing the broken page, is to add cfcontent reset="true" before the cfdump.
🙏 1
a
Or if the response is not text/html, so the browser doesn't know to render it thus. Like an dump/abort in something that is supposed to be returning JSON or XML or some such.
👍 1
f
could also happen if you use Content-Security-Policy and have specified a style-src: https://content-security-policy.com/style-src directive, the inline styles would be blocked (we need a nonce attribute on cfdump btw!)
👍🏼 1
a
Oh god I wish American ppl would talk to native English speakers before coming up with terms for things.
🤣 2
😂 1
😉
(ref - for those staring blankly - https://en.wiktionary.org/wiki/nonce#Etymology_2)
😲 1
b
Most of the time I see this, it's because the request had set the content-type of the response to something other than text/html as Adam said above. Open your browser debugger and look at the content-type of the response. Putting a cfheader tag above it to set the content-type back before dumping will fix.
🙏 1
f
oh wow Adam, I had no idea about that - terrible choice of word! This has pretty much been baked into all the browsers for a several years now. Pretty sure google addded that feature
a
Oh yeah when I first heard of them, I was like "you decided to call them f***in what?"
I await someone in USA to come up with a Common Unified Network Tunnel (or something), and unwittingly come up with... a really bad acronym.
q
Nothing like that surprises me anymore after our marketing team here came up with the #wtfMSU which was supposed to stand for "What to Fix"... $1M down the drain
😄 1
😂 1
s
@Adam Cameron I hadn't heard of that one either... I'll add that to my list of words to be careful of. Like you would need to be careful about how you ask for a "cigarette" in North America (https://en.wiktionary.org/wiki/fag#Etymology_2) and we should all be careful not to ask for a "napkin" to wipe our face with in Canada (https://en.wiktionary.org/wiki/napkin#Etymology)
q
Yeah, asking for a cigarette in the british way within the US will get you scorned 2x. One for the term and one for what you are asking for.
s
or saying something like: "I'm so upset! I really want to smoke a (brittish cigarette) right now!" could certainly give the wrong impression and make you sound like someone about to commit a hate crime.
I once held up two fingers when talking to a friend from Wales about something to emphasize the number "2" in what I was saying... The look of shock on their face as I unknowingly gave them the "Two-fingered solute" was a memorable moment.